package cn.com.jslh.boarpro.util.adapter;

import android.graphics.Color;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseViewHolder;

import cn.com.jslh.boarpro.R;
import cn.com.jslh.boarpro.main.entity.NewsWarnEnity;

/**
 * Created by lenovo on 2018/3/26.
 */

public class NewsWarnTitleAdapter extends BaseRecycleAdapter<NewsWarnEnity> {

    public NewsWarnTitleAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, NewsWarnEnity item) {
        helper.setText(R.id.tv_news_warn_category,item.getTitle());
        helper.setText(R.id.tv_news_warn_title,item.getContent());
        helper.setText(R.id.tv_news_wrn_count,String.valueOf(item.getCount()));
        helper.setTextColor(R.id.tv_news_warn_category, Color.parseColor("#"+item.getTitleColor()));
//        helper.setTextColor(R.id.tv_news_warn_category,Integer.getInteger(item.getTitleColor()));
    }
}
